import { getFileIcon } from '@/utils/common';
import { cn } from '@/lib/utils';
interface Props {
  extension: string;
  className?: string;
}

/** 文件图标组件 */
const Thumbnail = ({ extension, className }: Props) => {
  return (
    <figure className={cn('thumbnail', className)}>
      <img
        src={getFileIcon(extension)}
        alt="thumbnail"
        className={cn('size-8 h-7 w-7 object-contain')}
      />
    </figure>
  );
};
export default Thumbnail;
